{% load tags %}
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
	<head>

		<title>{% block title %}School of Computer Science, University of Nottingham{% endblock title %}</title>

		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<meta http-equiv="Content-Language" content="en" />
		<meta name="Author" content="University of Nottingham" />
		<meta name="Copyright" content="Information copyright respective authors, Design & styles copyright (c) 2008 Ben Jenkinson" />
		<meta name="Description" content="{% block meta-description %}{% endblock %}" />
		<meta name="Keywords" content="{% block meta-keywords %}University, Nottingham, University of Nottingham, modules, lectures, coursework, lecture notes, exams{% endblock meta-keywords %}" />
		<meta name="Robots" content="all" />
		<meta http-equiv="imagetoolbar" content="false" />
		<meta name="MSSmartTagsPreventParsing" content="true" />

		<link rel="icon" type="image/gif" href="{% media favicon.gif %}" />
		<link rel="apple-touch-icon" href="{% media apple-touch-icon.png %}" />
		<link rel="stylesheet" type="text/css" media="screen, projection" href="{% media css/reset.css %}" />
		<link rel="stylesheet" type="text/css" media="screen, projection" href="{% media css/global.css %}" />

	</head>
	<body class="{% block template %}base{% endblock template %}">
	
		<div class="global-message">
			<div class="inner">
				<ul>
					<li>user.is_authenticated = <strong>{{user.is_authenticated}}</strong></li>
					<li>user.is_staff = <strong>{{user.is_staff}}</strong></li>
					<li>current_year = <strong>{{current_year}}</strong></li>
					<li>current_year.reference = <strong>{{current_year.reference}}</strong></li>
				</ul>
			</div>
		</div>
		
		{% block site-messages %}{% endblock site-messages %}

		<div class="site-container">
			{% block site-container %}

			<div class="navigation">
				{% block navigation %}

				<div class="inner">
					{% block navigation-inner %}

					<ul class="secondary">{% spaceless %}
						{% block navigation-secondary %}

						{% if user.is_authenticated %}
						{% if user.is_staff %}
						<li class="nav-admin">
							<a href="/admin/" title="View Admin Panel">Admin</a>
						</li>
						{% endif %}
						<li class="nav-account">
							<a href="/account/" title="Edit your Account">{{user.first_name}} {{user.last_name}}</a>
						</li>
						<li class="nav-logout">
							<a href="/account/logout/" title="Logout">Logout</a>
						</li>
						{% else %}
						<li class="nav-signup">
							<a href="/account/create/" title="Create an account">Sign up</a>
						</li>
						<li class="nav-login">
							<a href="/account/login/" title="Login to your account">Login</a>
						</li>
						{% endif %}

						{% endblock navigation-secondary %}
					{% endspaceless %}</ul>

					<span class="branding">
						{% block branding %}School of Computer Science{% endblock branding %}
					</span>

					<ul class="primary">{% spaceless %}
						{% block navigation-primary %}
						
						<li class="nav-courses">
							<a href="{% url courses_course_list %}">Courses</a>
						</li>
						<li class="nav-modules">
							<a href="{% url modules_moduleinstance_list %}{{current_year.reference}}/">Modules</a>
						</li>
						<li class="nav-people">
							<a href="{% url people_person_list %}">People</a>
						</li>
						
						{% if user.is_authenticated %}
						<li class="nav-yourstuff">
							<a href="/my/">Your Stuff</a>
						</li>
						{% endif %}

						{% comment %}
						{% if user.is_authenticated %}
						{% if user.is_student %}
						<li class="nav-courses">
							<a href="{{user.course_taken.get_absolute_url}}">{{user.course_taken.code}}</a>
						</li>
						<li class="nav-assignments">
							<a href="/my/assignments/">Assignments</a>
						</li>
						{% endif %}
						<li class="nav-calendar">
							<a href="/my/calendar/">Calendar</a>
						</li>
						{% endif %}
						{% endcomment %}

						{% endblock navigation-primary %}
					{% endspaceless %}</ul>

					{% endblock navigation-inner %}
				</div><!-- /.inner -->

				{% endblock navigation %}
			</div><!-- /.navigation -->

			<div id="header">
				{% block header %}

				<div class="inner">
					{% block header-inner %}

					{% endblock header-inner %}
				</div><!-- /.inner -->

				{% endblock header %}
			</div><!-- /.header -->

			<div class="body">
				{% block content %}

				<div class="inner">
					{% block content-inner %}

					<div class="error">
						<p>This page hasn't been given any content. This is the base template.</p>
					</div>

					{% endblock content-inner %}
				</div><!-- /.inner -->

				{% endblock content %}
			</div><!-- /.body -->

			<div class="footer">
				{% block footer %}

				<div class="inner">
					{% block footer-inner %}
					
					<div class="shorturl">
						{% block shorturl %}{% endblock shorturl %}
					</div>

					{% endblock footer-inner %}
				</div><!-- /.inner -->

				{% endblock footer %}
			</div><!-- /.footer -->

			{% endblock site-container %}
		</div><!-- /.site-container -->

	</body>

</html>
